//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core;

namespace OpenLS.Spreadsheet
{
    class DimensionPropertyUndoUnit: IUndoUnit
    {
        public DimensionPropertyUndoUnit(Dimension d, DimensionProperty prop, object value)
        {
            Dimension = d;
            Property = prop;
            Value = value;
        }

        readonly Dimension Dimension;
        readonly DimensionProperty Property;
        readonly object Value;
        #region IUndoUnit Members

        public void Do()
        {
            Dimension.SetDimensionProperty(Property, Value);
        }

        public bool Merge(IUndoUnit unit)
        {
            return false;
        }

        #endregion
    }
}
